package com.jsb.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsb.mapper.RewardFlowMapper;
import com.jsb.model.RewardFlow;
import com.jsb.model.RewardFlowExample;

@Service
public class RewardFlowService{
	
	@Resource
	private RewardFlowMapper rewardFlowMapper;
	
	public void addRewardFlow(RewardFlow rewardFlow) {
		rewardFlowMapper.insertSelective(rewardFlow);
	}
	
	public void delRewardFlowByUuid(String uuid) {
		rewardFlowMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateRewardFlow(RewardFlow rewardFlow) {
		rewardFlowMapper.updateByPrimaryKeySelective(rewardFlow);
	}
	
	public void updateRewardFlowByExample(RewardFlow rewardFlow,RewardFlowExample rewardFlowExample){
	    rewardFlowMapper.updateByExampleSelective(rewardFlow,rewardFlowExample);
	}
	
	public RewardFlow getRewardFlowByUuid(String uuid) {
		return rewardFlowMapper.selectByPrimaryKey(uuid);
	}
	
	public List<RewardFlow> getPageRewardFlow(RewardFlowExample rewardFlowExample) {
		return rewardFlowMapper.selectPage(rewardFlowExample);
	}
	
	public int countRewardFlow(RewardFlowExample rewardFlowExample) {
		return rewardFlowMapper.countByExample(rewardFlowExample);
	}
	
	public List<RewardFlow> selectByExample(RewardFlowExample example){
	    return rewardFlowMapper.selectByExample(example);
	}
}
